<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>基本资料</title>
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_859911_e6n6y8wcql.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
    <link rel="stylesheet" href="../css/main.css">
</head>
<body>
<form class="weui-cells weui-cells_form" id="submit">
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">业务员</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="text" pattern="[0-9]*" placeholder="请选择业务员" id="ywy" name="a">
        </div>
        <div class="weui-cell__bd">
            <span class="weui-cell__ft"></span>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">放款时间</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="text" placeholder="请选择时间" id="datetime-fkTime" name="b">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">客户名称</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="text" placeholder="请输入客户名称" name="c">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">身份证</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="number" pattern="[0-9]*" placeholder="请输入身份证号码" name="d">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">公司名称</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="number" pattern="[0-9]*" placeholder="请输入公司名称" name="e">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">放款金额</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="number" pattern="[0-9]*" name="f">
        </div>
        <div class="weui-cell__bd">
            <label class="weui-label">元</label>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">计息周期</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="number" pattern="[0-9]*" name="g">
        </div>
        <div class="weui-cell__bd">
            <label class="weui-label">天</label>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">闹钟</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="text" pattern="[0-9]*" placeholder="请选择" id="clockSelect" name="h">
            <input class="weui-input" type="hidden" id="clockTime">
        </div>
    </div>
    <div class="weui-cells weui-cells_form" style="margin:0;">
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <textarea class="weui-textarea" placeholder="备注" rows="3" name="i"></textarea>
                <div class="weui-textarea-counter"><span>0</span>/200</div>
            </div>
        </div>
    </div>
    <div class="weui-btn-area">
        <button class="weui-btn weui-btn_primary">下一步</button>
    </div>
</form>
<!--<div class="weui-cells__title"></div>-->
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/jquery-weui.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/city-picker.min.js"></script>
<script>
    $(function () {

        $("#ywy").picker({
            cols: [
                {
                    textAlign: 'center',
                    values: ['xxxx1', 'xxxx2', 'xxxx3','xxxx4','xxxx5']
                }
            ]
        });
        $("#clockSelect").picker({
            cols: [
                {
                    textAlign: 'center',
                    values: ['周日', '周一', '周二','周三','周四','周五','周六','自定义日期时间']
                }
            ],
            onChange(msg){
                console.log(msg);
            },
            onClose(res){
                if(res.value == '自定义日期时间')$("#clockTime").datetimePicker({
                    onClose(data){
                        console.log(data);
                        var time = data.value;
                        $("#clockSelect").val(time[0]+'-'+time[1]+'-'+time[2]+'-'+time[3]+':'+time[4]);
                    }
                }).click();
            }
        });
        $("#datetime-fkTime").calendar();
        $("#city-picker").cityPicker({
            title: "请选择收货地址"
        });
        $("#submit").submit(function () {
            var d = {};
            var t = $(this).serializeArray();
            $.each(t, function() {
                d[this.name] = this.value;
            });
            console.log(d);
            return false;
        });
    });

</script>
</body>
</html>